Photography method, electronic device, and storage medium

ABSTRACT

A photography method, includes: receiving an instruction of launching to collect images; establishing an AR anchor in an image viewfinder of the electronic device, the AR anchor corresponding to a position of a photographed object in a virtual three-dimensional space; generating a moving shot track in the image viewfinder based on a current position of the camera module and the AR anchor, the moving shot track representing a desired moving route of the camera module in the virtual three-dimensional space; and performing image collection on the photographed object based on the moving shot track.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based on and claims priority to Chinese PatentApplication No. 202010942772.2 filed on Sep. 9, 2020, the content ofwhich is hereby incorporated by reference in its entirety into thisdisclosure.

BACKGROUND

Presently, in order to obtain a video with specific effect, a movingshot is generally employed when shooting the photograph. That is,photography is performed by moving the camera position, changing anoptical axis of a camera lens, or changing a focal length of a cameralens, which is also known as “moving shot” (or “camera movement”). Inorder to perform a moving shot, operations such as selecting a positionand laying a guide track require multiple professionals and hardware,which is inconvenient for a user of an ordinary terminal. Moreover, suchoperations are expensive due to the requirement of extra labor andequipments.

SUMMARY

The disclosure relates to the field of control technologies, and moreparticularly, it relates to a photography method, an electronic device,and a storage medium.

According to a first aspect of embodiments of the disclosure, aphotography method is provided, which is applicable to an electronicdevice provided with a camera module thereon. The method includes:receiving an instruction of launching to collect images; establishing anaugmented reality (AR) anchor in an image viewfinder of the electronicdevice, the AR anchor corresponding to a position of a photographedobject in a virtual three-dimensional space; generating a moving shottrack in the image viewfinder based on a current position of the cameramodule and the AR anchor, the moving shot track representing a desiredmoving route of the camera module in the virtual three-dimensionalspace; and performing image collection on the photographed object basedon the moving shot track.

According to a second aspect of embodiments of the disclosure, there isprovided an electronic device. The electronic device includes: a camera,a processor, and a memory. The memory is configured to store a computerprogram executable by the processor. The processor is configured toexecute the computer program in the memory to perform the photographymethod according to the first aspect.

According to a third aspect of embodiments of the disclosure, there isprovided a computer-readable storage medium. The photography methodaccording to the first aspect is implemented when an executable computerprogram stored in the storage medium is executed by a processor.

It is to be understood that both the foregoing general description andthe following detailed description are exemplary and explanatory only,and are not restrictive of the disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of this specification, illustrate embodiments consistent with thedisclosure, and serve to explain the principle of the disclosuretogether with the description.

FIG. 1 is a flow chart illustrating a photography method according tosome embodiments.

FIG. 2 is a flow chart illustrating determining an AR anchor accordingto some embodiments.

FIG. 3 is a schematic diagram illustrating an effect of an augmentedreality scene according to some embodiments.

FIG. 4 is a flow chart illustrating obtaining a feature point accordingto some embodiments.

FIG. 5 is a flow chart illustrating obtaining a feature point accordingto some embodiments.

FIG. 6 is a flow chart illustrating generating a moving shot trackaccording to some embodiments.

FIG. 7 is a flow chart illustrating obtaining a target templateaccording to some embodiments.

FIG. 8 is a schematic diagram illustrating an effect of a displaytemplate according to some embodiments.

FIG. 9 is a schematic diagram illustrating an effect of displaying amoving shot track according to some embodiments.

FIG. 10 is a flow chart illustrating generating a moving shot trackaccording to some embodiments.

FIG. 11 is a schematic diagram illustrating an effect of displaying twomoving shot tracks according to some embodiments.

FIG. 12 is a flow chart illustrating a photography method according tosome embodiments.

FIG. 13 is a flow chart illustrating a photography method according tosome embodiments.

FIG. 14 is a flow chart illustrating a photography method according tosome embodiments.

FIG. 15 is a schematic diagram illustrating adjusting a specifiedparameter of the moving shot track according to some embodiments.

FIG. 16 is a block diagram illustrating a photography apparatusaccording to some embodiments.

FIG. 17 is a block diagram illustrating an electronic device accordingto some embodiments.

DETAILED DESCRIPTION

Exemplary embodiments will be described in detail herein, examples ofwhich are illustrated in the accompanying drawings. When the followingdescription refers to the accompanying drawings, the same or similarelements may be denoted by the same numerals in different accompanyingdrawings, unless otherwise indicated. The implementations described inthe following exemplary embodiments do not represent all implementationsconsistent with the present disclosure. Instead, they are merelyexamples of apparatuses and methods consistent with some aspects of thedisclosure as described in the appended claims.

To solve the above technical problems, embodiments of the disclosureprovide a photography method. The photography method may be applicableto an electronic device having a camera module provided thereon, such asa smart phone, a tablet and a smart headphone. The electronic device mayexecute the above photography method when a user turns on the cameramodule for photography. FIG. 1 is a flow chart illustrating aphotography method according to some embodiments. The method includesthe actions at blocks 11-14.

At block 11, an instruction of launching to collect images is received.

In embodiments, after the camera module is enabled (or turned on), theelectronic device may display an image viewfinder on a display screen,and the user may launch an image collection function by touching thedisplay screen or using a button. The image collection function mayemploy a video photography function or a continuous photography imagefunction. A processor in the electronic device may detect the displayscreen or the button, and obtain the instruction of launching to collectimages.

At block 12, an AR (augmented reality) anchor is established in theimage viewfinder of the electronic device. The AR anchor corresponds toa position of a photographed object in a virtual three-dimensionalspace.

In embodiments, referring to FIG. 2, at block 21, the processor in theelectronic device may obtain multiple feature points of each object inthe image viewfinder, and the effect is illustrated in FIG. 3. Referringto FIG. 3, the feature point 20 represents an elbow of people in theimage viewfinder and a spatial position of the elbow in the whole imageviewfinder (reflected by coordinate data of the feature point and apositional relationship of the feature point relative with other featurepoints).

Obtaining, by the processor, the multiple feature points of each objectin the image viewfinder may include the following.

In an example, the electronic device has an ordinary camera and a depthcamera provided thereon. In this way, the ordinary camera may obtain aplane image of a preview scene in the image viewfinder, and the depthcamera may obtain a depth image of the preview scene. Referring to FIG.4, at block 41, the processor may communicate with the ordinary cameraand the depth camera respectively, to obtain the plane image and thedepth image. At block 42, the processor may obtain the multiple featurepoints of each object in the preview scene based on the depth image andthe plane image. These feature points may reflect an outline and aspatial position of each object, such as a head and an elbow of acharacter, a foot of a table, and a corner of a room. It may beunderstood that, attribute data of each feature point may includethree-dimensional coordinate data, spatial relationship data of thefeature point with other feature points, spatial relationship data ofthe feature point with a shot, and the like, and may be set based on adetailed scene. Finally, the processor may insert the multiple featurepoints into the object of the preview scene. A process of inserting thefeature points into the preview scene may refer to the related art,which is not elaborated here.

In another example, the electronic device has the ordinary camera andthe depth camera provided thereon, such that the ordinary camera mayobtain the plane image of the preview scene and the depth camera mayobtain the depth image of the preview scene. Refer to FIG. 5, at block51, the processor may obtain the plane image and the depth image of thepreview scene. At block 52, the processor may call a feature pointextraction model set in advance, such as a FAST (Features fromaccelerated segment test) algorithm, a SIFT (Scale Invariant FeatureTransform) algorithm, a SUFR (Speeded-Up Robust Features) algorithm, anORB (Oriented Fast and Rotated Brief) algorithm, or a HARRIS algorithm,and input the plane image into the feature point extraction model,thereby obtaining the multiple feature points in the plane image. It maybe understood that, the attribute data of each feature point may includetwo-dimensional coordinate data, plane relationship data of the featurepoint with other feature points, plane relationship data of the featurepoint with the shot, and on the like. At block 53, the processor maydetermine depth data of each feature point based on the depth image, andupdate the plane relationship to the spatial relationship, that is, eachfeature point is migrated from a plane coordinate system to athree-dimensional coordinate system. In this way, the attribute data ofeach feature point may include the three-dimensional coordinate data,the spatial relationship data of the feature point with other featurepoints, and the spatial relationship data of the feature point with theshot. Finally, the processor may insert the multiple feature points intothe object of the preview scene.

It should be noted that, the core of the action is that, after the imagecollection function is enabled, a current ordinary photography mode(that is, any object in the preview scene is displayed) may beautomatically switched to the virtual three-dimensional space, toachieve the effect as illustrated in FIG. 3 that the multiple featurepoints are included.

Referring to FIG. 2, at block 22, one feature point is determined fromthe multiple feature points as the AR anchor. An object located by theAR anchor is taken as the photographed object, and the position of theAR anchor corresponds to the position of the photographed object in thevirtual three-dimensional space. In the embodiments, the processorcommunicates with the display in the electronic device, and controls thedisplay to display the image viewfinder, such that the multiple featurepoints are shown to the user. The user may trigger the electronic devicein a way such as pressing the button or touching the display, forexample, the user clicks the feature point 20 in FIG. 3. In this way,the processor may determine a feature point in the image viewfinder asthe AR anchor based on the trigger operation. It should be understoodthat, the object located by the AR anchor is taken as the photographedobject. In other words, the user selects the photographed object in thevirtual three-dimensional space by selecting the AR anchor.

At block 13, a moving shot track is generated in the image viewfinderbased on a current position of the camera module and the AR anchor. Themoving shot track represents a desired moving route of the camera modulein the virtual three-dimensional space.

In embodiments, generating, by the processor in the electronic device,the moving shot track based on the current position of the shot in theelectronic device and the AR anchor includes the following.

In an example, a template library is preset in the electronic device.The template library includes multiple templates. Each template includesa target shape of the moving shot track and a relative position betweena reference point and the moving shot track. For example, when atemplate 1 includes that a shape of the moving shot track is circular,and a relative position between the reference point and the moving shottrack is the radius, the template 1 corresponds to a moving shot skillof a surround. When a template 2 includes a vertical line segment withthe shape of the moving shot track from top to bottom, and the referencepoint is located at an upper end point of the vertical line, thetemplate 2 corresponds to a moving shot skill of a drop. A shapeobtained by reversing the shape in template 2 corresponds to a movingshot skill of a lift. When a template 3 includes a horizontal linesegment with the shape of the moving shot track from left to right, andthe reference point is a left end point of the horizontal line segment,the template 3 corresponds to a moving shot skill of a truck. It shouldbe noted that, merely several templates are listed above, acorresponding template may be set based on a detailed moving spot skill,such as a following shot, a pan & tilt shot, a dolly zoom in shot, and adolly zoom out shot, and the corresponding templates fall into the scopeof the disclosure.

Referring to FIG. 6, at block 61, obtaining, by the processor, a targettemplate from a preset template library as the target template, whichmay include the following. Referring to FIG. 7, at block 71, templatesin the preset template library may be displayed; the templates includeat least one of: a dolly zoom in template, a dolly zoom out template, apan & tilt template, a truck template, a lift template, a drop template,and a surround template; at block 72, a template corresponding to atrigger operation is obtained as the target template in a case that thetrigger operation for selecting the template is detected.

For example, at block 71, after the processor determines the AR anchor,multiple templates may be matched from the template library as candidatetemplates based on the position of the AR anchor or the correspondingobject of the AR anchor, and listed and displayed around the AR anchor,and the effect is illustrated in FIG. 8, thereby facilitating selectionof the user. Of course, a matching way may also be randomly selectingmultiple candidate templates, or selecting multiple candidate templateswith higher use frequencies from a use history of the user, and thecorresponding matching way falls in the scope of the disclosure. Atblock 72, when the user triggers one of the multiple candidatetemplates, the processor may determine the candidate template as thetarget template. Accordingly, the target template includes the targetshape of the moving shot track and the relative position between thereference point and the moving shot track.

At block 62, the processor may superimpose the AR anchor and thereference point, such that the AR anchor coincides with the referencepoint. The processor may generate the moving shot track that passesthrough the current position of the shot and matches the target shapewhen the AR anchor coincides with the reference point, and the effect isillustrated in FIG. 9. Referring to FIG. 9, when the user selects thefeature point 20 of the character as the AR anchor and selects thetemplate 3, the horizontal line segment 21 from left to right may beobtained, and a horizontal distance between the horizontal line segment21 and the AR anchor is d (i.e., the relative position between thereference point and the moving shot track).

For another example, a preset rule is stored in the electronic device,and the preset rule may include multiple rules for generating themovement shot track. For example, taking the AR anchor as the center, acircle passing through the current position or a circle with a presetradius is generated, and the circle corresponds to the moving shot skillof the surround when is taken as the moving shot track. For anotherexample, when the reference point with the distance d from the AR anchorin the horizontal direction is taken as the start point or the currentposition is taken as the start point, a vertical line segment from topto bottom is generated, and the vertical line segment corresponds to themoving shot skill of the drop when taken as the moving shot track. Foranother example, when the reference point with the distance d from theAR anchor in the horizontal direction is taken as the start point or thecurrent position is taken as the start point, the horizontal linesegment from left to right is generated, and the horizontal line segmentcorresponds to the moving shot skill of the truck when taken as themoving shot track. It should be noted that, merely a few rules arelisted above. A corresponding rule may be set based on a detailed movingshot skills, such as the following shot, the pan & tilt shot, the dollyzoom in shot, and the dolly zoom out shot, and the correspondingtemplates fall into the scope of the disclosure.

Referring to FIG. 10, at block 101, the processor may generate at leastone moving shot track according to the AR anchor and the currentposition based on the preset rule, and the effect is illustrated as FIG.11. Referring to FIG. 11, the processor generates a moving shot track 21and a moving shot track 22. At block 102, the processor may detect thetrigger operation of the user and determine the moving shot trackselected by the user as the generated moving shot track.

In a practical application, multiple objects may be included in theimage viewfinder. A moving shot track generated based on the template orthe preset rule may pass through a certain object. In this case, theuser may be in danger in the moving shot process. Therefore, in someembodiments, referring to FIG. 12, at block 121, the processor maycompare the moving shot track and the position of the object in theimage viewfinder, to determine whether the object is located in themoving shot track. At block 122, when the object exists in the movingshot track, the processor may adjust a part of the moving shot trackaround the object, and take the adjusted moving shot track as a finalmoving shot track; otherwise, no adjustment is made. In this way, inembodiments, through performing adaptive adjustment on the moving shottrack, the safety of the user is ensured while the moving shotphotography is implemented.

At block 14, image collection is performed on the photographed objectbased on the moving shot track.

In embodiments, the user may perform the image collection on thephotographed object based on a guidance of the moving shot track, suchas a video may be photographed and continuous images may bephotographed.

In practical application, the user may move the electronic device afterthe image viewfinder is generated. At this time, referring to FIG. 13,at block 131, the processor may obtain a real-time position and aninitial position of the camera module. The initial position indicates aposition of the camera module when the moving shot track is generated.At block 132, the processor may obtain a spatial relationship among theinitial position, the position of the AR anchor, and the moving shottrack. It should be noted that, the spatial relationship among theinitial position, the position of the AR anchor, and the moving shottrack is actually obtained when the moving shot track is obtained.Therefore, the spatial relationship may be calculated in advance andstored in a specific position for subsequent use. At block 133, theprocessor may, move the AR anchor and the moving shot track according toa position relative of the real-time position to the initial positionbased on the spatial relationship, thereby adjusting a display part ofthe moving shot track in the display screen. In this way, the amount ofprocessed data may be reduced, and the user experience may be improvedby dynamically displaying the moving shot track.

In practical application, the user or the shot may deviate from themoving shot track during the moving mirror photography. Therefore, inembodiments, referring to FIG. 14, at block 141, the processor maydetect whether the camera module is located in the moving shot track ina photography process. At block 142, a specified parameter (such as acolor, a width, a virtual and real line, a moving speed, or a strobe) ofthe moving shot track is adjusted to remind that the camera moduledeviates from the moving shot track in a case that the camera module isnot located in the moving shot track, and the effect is illustrated inFIG. 15. The moving shot track at block 23 is thinned to remind the userthat the moving shot track is far away. In this way, in embodiments, itmay be ensured that the user may operate the moving shot accurately toobtain a high-quality video.

In embodiments, the moving shot track is displayed in the virtualreality scene, thereby facilitating the user to use the moving shotphotography skill based on the moving shot track, and obtaining thehigh-quality video. Meanwhile, in embodiments, there is no need to carryextra hardware, thereby reducing the cost. In addition, the user doesnot need professional moving shot knowledge, thereby reducing a learningcost and facilitating to improve photography experience.

Description will be made below to the photography method incommunication with various moving shot skills.

A dolly zoom in shot or a dolly zoom out shot

Description: a photographer does not move, and the shot is moved towardsthe object from far.

Implementation:

-   -   1. selecting a photographed object and a template;    -   2. selecting an AR anchor and the photographed object to        generate a moving shot track; and    -   3. performing, by the photographer, image collection based on        the moving shot track.

A Pan & Tilt Shot

Description: a photographer moves, a position of a shot is fixed, and aphotography angle of the shot follows the movement of the photographer.

Implementation:

-   -   1. selecting, by the photographer, a photographed object and a        template; and    -   2. dynamically recognizing a position of the photographed        object, and moving the shot based on the position for image        collection.

A Truck Shot

Description: a fixed distance is kept between a photographed object anda shot, and the shot moves with the photographed object.

Implementation:

-   -   1. selecting, by a photographer, an AR anchor, the photographed        object and the template;    -   2. generating a moving shot track at a fixed distance and a        fixed direction of the AR anchor; and    -   3. detecting a position of the photographed object in each frame        of a video, and the photographer moving in parallel to collect        images.

A Lift

Description: a camera moves based on a direction from top to bottom orfrom bottom to top.

Implementation:

-   -   1. selecting, by a photographer, an AR anchor, a photographed        object and a template;    -   2. associating a placement height of the AR anchor with a height        of the photographed object based on the direction from top to        bottom or from bottom to top; and    -   3. displaying a moving shot track and a position with a fixed        distance as a start point for image collection.

On the basis of the photography method, embodiments of the disclosurealso provide a photography apparatus, applicable to an electronic deviceprovided with a camera module thereon. Referring to FIG. 16, theapparatus also includes: an instruction receiving module 161, an anchorestablishing module 162, a track generating module 163, and an imagecollection module 164.

The instruction receiving module 161 is configured to receive aninstruction of launching to collect images.

The anchor establishing module 162 is configured to establish an ARanchor in an image viewfinder of the electronic device. The AR anchorcorresponds to a position of a photographed object in a virtualthree-dimensional space.

The track generating module 163 is configured to generate a moving shottrack in the image viewfinder based on a current position of the cameramodule and the AR anchor. The moving shot track represents a desiredmoving route of the camera module in the virtual three-dimensionalspace.

The image collection module 164 is configured to perform imagecollection on the photographed object based on the moving shot track.

In some embodiments, the anchor establishing module includes: a featurepoint obtaining unit and an anchor determining unit. The feature pointobtaining unit is configured to obtain multiple feature points of eachobject in the image viewfinder. The anchor determining unit isconfigured to determine one feature point from the multiple featurepoints as the AR anchor. An object located by the AR anchor is taken asthe photographed object, and a position of the AR anchor corresponds tothe position of the photographed object in the virtual three-dimensionalspace.

In some embodiments, the feature point obtaining unit includes: an imageobtaining subunit, and a feature point obtaining subunit. The imageobtaining subunit is configured to obtain a plane image and a depthimage of a preview scene in the image viewfinder. The feature pointobtaining subunit is configured to obtain the multiple feature points ofeach object in the preview scene based on the depth image.

In some embodiments, the feature point obtaining unit includes: an imageobtaining subunit, a feature point extracting subunit, and a featurepoint determining subunit. The image obtaining subunit is configured toobtain a plane image and a depth image of a preview scene in the imageviewfinder. The feature point extracting subunit is configured to obtainmultiple feature points in the plane image based on a preset featurepoint extraction model. The feature point determining subunit isconfigured to determine depth data of each feature point based on thedepth image to obtain the plurality of feature points of each object.

In some embodiments, the track generating module includes: a templateobtaining unit, and a track generating unit. The template obtaining unitis configured to obtain a target template from a preset templatelibrary. The target template includes a target shape of the moving shottrack, and a relative position between a reference point and the movingshot track. The track generating unit is configured to generate themoving shot track which passes through the current position and ismatched with the target shape in a case that the AR anchor coincideswith the reference point.

In some embodiments, the template obtaining unit includes: a templatedisplay subunit, and a template determining subunit. The templatedisplay subunit is configured to display templates in the presettemplate library, the templates including at least one of: a dolly zoomin template, a dolly zoom out template, a pan & tilt template, a trucktemplate, a lift template, a drop template, and a surround template. Thetemplate determining subunit is configured to obtain a templatecorresponding to a trigger operation as the target template in a casethat the trigger operation for selecting the template is detected.

In some embodiments, the track generating module includes: a trackgenerating unit, and a track determining unit. The track generating unitis configured to generate at least one moving shot track according tothe AR anchor and the current position based on a preset rule, themoving shot track including one or more of: a dolly zoom in track, adolly zoom out track, a pan & tilt track, a truck track, a lift track, adrop track, and a surround track. The track determining unit isconfigured to determine a moving shot track selected by a user as thegenerated moving shot track.

In some embodiments, the apparatus also includes: a position comparingmodule, and a track adjusting module. The position comparing module isconfigured to compare the moving shot track with a position of eachobject in the image viewfinder. The track adjusting module is configuredto adjust a part of the moving shot track around an object such that themoving shot track bypasses the object in a case that the object existson the moving shot track.

In some embodiments, the image collection module includes: a positionobtaining unit, a relationship obtaining unit, and a track moving unit.The position obtaining unit is configured to obtain a real-time positionand an initial position of the camera module. The initial positionindicates a position of the camera module when the moving shot track isgenerated. The relationship obtaining unit is configured to obtain aspatial relationship among the initial position, the position of the ARanchor, and the moving shot track. The track moving unit is configuredto, according to the spatial relationship, move the AR anchor and themoving shot track based on a relative position of the real-time positionto the initial position.

In some embodiments, the image collection module includes: a trackdetecting unit, and a track adjusting unit. The track detecting unit isconfigured to detect whether the camera module is located on the movingshot track in a photography process. The track adjusting unit isconfigured to adjust a specified parameter of the moving shot track toremind that the camera module deviates from the moving shot track in acase that the camera module is not located on the moving shot track.

It may be understood that, the photography apparatus according toembodiments of the disclosure corresponds to the above photographymethod. Detailed contents of the photography apparatus may be referredto the contents of each embodiment of the photography method, which arenot be elaborated herein.

FIG. 17 is a block diagram illustrating an electronic device accordingto some embodiments. For example, the electronic device 1700 may be amobile phone, a computer, a digital broadcasting terminal, a tabletdevice, a medical device, a fitness equipment, a personal digitalassistant or the like.

As illustrated in FIG. 12, the electronic device 1700 may include one ormore of: a processing component 1702, a memory 1704, a power component1706, a multimedia component 1708, an audio component 1710, aninput/output (I/O) interface 1712, a sensor component 1714, acommunication component 1716, and an image collection component 1718.

The processing component 1702 typically controls overall operations ofthe electronic device 1700, such as the operations associated withdisplay, telephone calls, data communications, camera operations, andrecording operations. The processing component 1702 may include one ormore processors 1702 for executing a computer program. Moreover, theprocessing component 1702 may include one or more modules whichfacilitate the interaction between the processing component 1702 andother components. For example, the processing component 1702 may includea multimedia module to facilitate the interaction between the multimediacomponent 1708 and the processing component 1702.

The memory 1704 is configured to store various types of data to supportthe operation of the electronic device 1700. Examples of such datainclude a computer program for any application or method operated on theelectronic device 1700 for performing contraction data, phonebook data,messages, pictures, video, etc. The memory 1704 may be implemented usingany type of volatile or non-volatile memory devices, or a combinationthereof, such as a static random access memory (SRAM), an electricallyerasable programmable read-only memory (EEPROM), an erasableprogrammable read-only memory (EPROM), a programmable read-only memory(PROM), a read-only memory (ROM), a magnetic memory, a flash memory, amagnetic or optical disk.

The power component 1706 is configured to provide power to variouscomponents of the electronic device 1700. The power component 1706 mayinclude a power management system, one or more power sources, and anyother components associated with the generation, management, anddistribution of power in the electronic device 1700. The power component1706 may include a power chip. The controller may communicate with thepower chip, to control the power chip to turn on or turn off a switchingdevice, such that the battery may supply power to the motherboardcircuit or not.

The multimedia component 1708 includes a screen providing an outputinterface between the electronic device 1700 and the user. In someembodiments, the screen may include a liquid crystal display (LCD) and atouch panel (TP). If the screen includes the touch panel, the screen maybe implemented as a touch screen to receive an input signal from theuser. The touch panel includes one or more touch sensors to sensetouches, swipes, and gestures on the touch panel. The touch sensors maynot only sense a boundary of a touch or swipe action, but also sense aduration and a pressure associated with the touch or swipe action.

The audio component 1710 is configured to output and/or input an audiosignal. For example, the audio component 1710 includes a microphone(“MIC”) for receiving an external audio signal when the electronicdevice 1700 is in an operation mode, such as a call mode, a recordingmode, and a voice recognition mode. The received audio signal may befurther stored in the memory 1704 or transmitted via the communicationcomponent 1716. In some embodiments, the audio component 1710 furtherincludes a speaker to output the audio signal.

The I/O interface 1712 is configured to provide an interface between theprocessing component 1702 and peripheral interface modules, such as akeyboard, a click wheel, buttons, and the like.

The sensor component 1714 includes one or more sensors for providingstatus assessments of various aspects of the electronic device 1700. Forexample, the sensor component 1714 may detect an open/closed status ofthe electronic device 1700, relative positioning of components, e.g.,the display and the keypad of the electronic device 1700, a change inposition of the electronic device 1700 or a component of the electronicdevice 1700, a presence or absence of user contraction with theelectronic device 1700, an orientation or an acceleration/decelerationof the electronic device 1700, and a change in temperature of theelectronic device 1700. In an example, the sensor component 1714 mayinclude a magnetic sensor, a gyroscope and a magnetic field sensor. Themagnetic field sensor includes at least one of: a Hall sensor, a thinfilm magneto resistive sensor, and a magnetic liquid accelerationsensor.

The communication component 1716 is configured to facilitatecommunication, wired or wirelessly, between the electronic device 1700and other devices. The electronic device 1700 may access a wirelessnetwork based on a communication standard, such as Wi-Fi, 2G, 3G, 4G,5G, or a combination thereof. In some embodiments, the communicationcomponent 1716 receives a broadcast signal or broadcast associatedinformation from an external broadcast management system via a broadcastchannel. In some embodiments, the communication component 1716 furtherincludes a near field communication (NFC) module to facilitateshort-range communications. For example, the NFC module may beimplemented based on a radio frequency identification (RFID) technology,an infrared data association (IrDA) technology, an ultra-wideband (UWB)technology, a Bluetooth (BT) technology, and other technologies.

In one or more exemplary embodiments, the electronic device 1700 may beimplemented with one or more application specific integrated circuits(ASICs), digital signal processors (DSPs), digital signal processingdevices (DSPDs), programmable logic devices (PLDs), field programmablegate arrays (FPGAs), controllers, micro-controllers, microprocessors, orother electronic components, for performing the above methods.

In some embodiments, there is also provided a non-transitorycomputer-readable storage medium including a computer program, such asthe memory 1704 including the computer program. The computer program maybe executed by the processor in the electronic device 1700 forperforming the above method. For example, the non-transitorycomputer-readable storage medium may be a ROM, a RAM, a CD-ROM, amagnetic tape, a floppy disc, an optical data storage device, and thelike.

Other implementations of the disclosure will be apparent to the skilledin the art from consideration of the specification and practice of thedisclosure disclosed here. This disclosure is intended to cover anyvariations, uses, or adaptations of the disclosure following the generalprinciples thereof and including such departures from the disclosure ascome in known or customary practice in the art. It is intended that thespecification and examples be considered as exemplary only, with a truescope and spirit of the disclosure being indicated by the followingclaims.

It should be understood that, the disclosure is not limited to theexaction construction that has been described above and illustrated inthe accompanying drawings, and that various modifications and changesmay be made without departing from the scope thereof. The scope of thedisclosure only be limited by the appended claims.

What is claimed is:
 1. A photography method, applicable to an electronicdevice provided with a camera module thereon, comprising: receiving aninstruction of launching to collect images; establishing an augmentedreality (AR) anchor in an image viewfinder of the electronic device, theAR anchor corresponding to a position of a photographed object in avirtual three-dimensional space; generating a moving shot track in theimage viewfinder based on a current position of the camera module andthe AR anchor, the moving shot track representing a desired moving routeof the camera module in the virtual three-dimensional space; andperforming image collection on the photographed object based on themoving shot track, wherein generating the moving shot track in the imageviewfinder based on the current position of the camera module and the ARanchor comprises: obtaining a target template from a preset templatelibrary, the target template comprising a target shape of the movingshot track, and a relative position between a reference point and themoving shot track; and generating the moving shot track which passesthrough the current position and is matched with the target shape in acase that the AR anchor coincides with the reference point, whereinobtaining the target template from the preset template librarycomprises: displaying templates in the preset template library, thetemplates comprising at least one of: a dolly zoom in template, a dollyzoom out template, a pan & tilt template, a truck template, a lifttemplate, a drop template, and a surround template; and obtaining atemplate corresponding to a trigger operation as the target template ina case that the trigger operation for selecting the template isdetected.
 2. The photography method as claimed in claim 1, whereinestablishing the AR anchor in the image viewfinder of the electronicdevice comprises: obtaining a plurality of feature points of each objectin the image viewfinder; and determining one feature point from theplurality of feature points as the AR anchor, an object located by theAR anchor being taken as the photographed object, and a position of theAR anchor corresponding to the position of the photographed object inthe virtual three-dimensional space.
 3. The photography method asclaimed in claim 2, wherein obtaining the plurality of feature points ofeach object in the image viewfinder comprises: obtaining a plane imageand a depth image of a preview scene in the image viewfinder; andobtaining the plurality of feature points of each object in the previewscene based on the depth image.
 4. The photography method as claimed inclaim 2, wherein obtaining the plurality of feature points of eachobject in the image viewfinder comprises: obtaining a plane image and adepth image of a preview scene in the image viewfinder; obtaining aplurality of feature points in the plane image based on a preset featurepoint extraction model; and determining depth data of each feature pointbased on the depth image to obtain the plurality of feature points ofeach object.
 5. The photography method as claimed in claim 1, whereingenerating the moving shot track in the image viewfinder based on thecurrent position of the camera module and the AR anchor comprises:generating at least one moving shot track according to the AR anchor andthe current position based on a preset rule, the moving shot trackcomprising one or more of: a dolly zoom in track, a dolly zoom outtrack, a pan & tilt track, a truck track, a lift track, a drop track,and a surround track; and determining a moving shot track selected by auser as the generated moving shot track.
 6. The photography method asclaimed in claim 1, after generating the moving shot track, furthercomprising: comparing the moving shot track with a position of eachobject in the image viewfinder; and adjusting a part of the moving shottrack around an object such that the moving shot track bypasses theobject in a case that the object exists on the moving shot track.
 7. Thephotography method as claimed in claim 1, wherein performing the imagecollection on the photographed object based on the moving shot trackcomprises: obtaining a real-time position and an initial position of thecamera module, the initial position indicating a position of the cameramodule when the moving shot track is generated; obtaining a spatialrelationship among the initial position, the position of the AR anchor,and the moving shot track; and according to the spatial relationship,moving the AR anchor and the moving shot track based on a relativeposition of the real-time position to the initial position.
 8. Thephotography method as claimed in claim 1, wherein performing the imagecollection on the photographed object based on the moving shot trackcomprises: detecting whether the camera module is located on the movingshot track in a photography process; and adjusting a specified parameterof the moving shot track to remind that the camera module deviates fromthe moving shot track in a case that the camera module is not located onthe moving shot track.
 9. An electronic device, comprising: a camera; aprocessor; and a memory, configured to store a computer programexecutable by the processor, wherein the processor is configured toexecute the computer program in the memory to: receive an instruction oflaunching to collect images; establish an augmented reality (AR) anchorin an image viewfinder of the electronic device, the AR anchorcorresponding to a position of a photographed object in a virtualthree-dimensional space; generate a moving shot track in the imageviewfinder based on a current position of the camera module and the ARanchor, the moving shot track representing a desired moving route of thecamera module in the virtual three-dimensional space; and perform imagecollection on the photographed object based on the moving shot track,wherein the processor is further configured to execute the computerprogram in the memory to: obtain a target template from a presettemplate library, the target template comprising a target shape of themoving shot track, and a relative position between a reference point andthe moving shot track; and generate the moving shot track which passesthrough the current position and is matched with the target shape in acase that the AR anchor coincides with the reference point, wherein theprocessor is further configured to execute the computer program in thememory to: display templates in the preset template library, thetemplates comprising at least one of: a dolly zoom in template, a dollyzoom out template, a pan & tilt template, a truck template, a lifttemplate, a drop template, and a surround template; and obtain atemplate corresponding to a trigger operation as the target template ina case that the trigger operation for selecting the template isdetected.
 10. The electronic device as claimed in claim 9, wherein theprocessor is further configured to execute the computer program in thememory to: obtain a plurality of feature points of each object in theimage viewfinder; and determine one feature point from the plurality offeature points as the AR anchor, an object located by the AR anchorbeing taken as the photographed object, and a position of the AR anchorcorresponding to the position of the photographed object in the virtualthree-dimensional space.
 11. The electronic device as claimed in claim10, wherein the processor is further configured to execute the computerprogram in the memory to: obtain a plane image and a depth image of apreview scene in the image viewfinder; and obtain the plurality offeature points of each object in the preview scene based on the depthimage.
 12. The electronic device as claimed in claim 10, wherein theprocessor is further configured to execute the computer program in thememory to: obtain a plane image and a depth image of a preview scene inthe image viewfinder; obtain a plurality of feature points in the planeimage based on a preset feature point extraction model; and determinedepth data of each feature point based on the depth image to obtain theplurality of feature points of each object.
 13. The electronic device asclaimed in claim 9, wherein the processor is further configured toexecute the computer program in the memory to: generate at least onemoving shot track according to the AR anchor and the current positionbased on a preset rule, the moving shot track comprising one or more of:a dolly zoom in track, a dolly zoom out track, a pan & tilt track, atruck track, a lift track, a drop track, and a surround track; anddetermine a moving shot track selected by a user as the generated movingshot track.
 14. The electronic device as claimed in claim 9, wherein theprocessor is further configured to execute the computer program in thememory to: compare the moving shot track with a position of each objectin the image viewfinder; and adjust a part of the moving shot trackaround an object such that the moving shot track bypasses the object ina case that the object exists on the moving shot track.
 15. Theelectronic device as claimed in claim 9, wherein the processor isfurther configured to execute the computer program in the memory to:obtain a real-time position and an initial position of the cameramodule, the initial position indicating a position of the camera modulewhen the moving shot track is generated; obtain a spatial relationshipamong the initial position, the position of the AR anchor, and themoving shot track; and according to the spatial relationship, move theAR anchor and the moving shot track based on a relative position of thereal-time position to the initial position.
 16. A non-transitorycomputer-readable storage medium having stored therein instructionsthat, when executed by a processor, causes the processor to perform aphotography method, the method being applicable to an electronic deviceprovided with a camera module thereon, and comprising: receiving aninstruction of launching to collect images; establishing an augmentedreality AR anchor in an image viewfinder of the electronic device, theAR anchor corresponding to a position of a photographed object in avirtual three-dimensional space; generating a moving shot track in theimage viewfinder based on a current position of the camera module andthe AR anchor, the moving shot track representing a desired moving routeof the camera module in the virtual three-dimensional space; andperforming image collection on the photographed object based on themoving shot track, wherein generating the moving shot track in the imageviewfinder based on the current position of the camera module and the ARanchor comprises: obtaining a target template from a preset templatelibrary, the target template comprising a target shape of the movingshot track, and a relative position between a reference point and themoving shot track; and generating the moving shot track which passesthrough the current position and is matched with the target shape in acase that the AR anchor coincides with the reference point, whereinobtaining the target template from the preset template librarycomprises: displaying templates in the preset template library, thetemplates comprising at least one of: a dolly zoom in template, a dollyzoom out template, a pan & tilt template, a truck template, a lifttemplate, a drop template, and a surround template; and obtaining atemplate corresponding to a trigger operation as the target template ina case that the trigger operation for selecting the template isdetected.